package com.example.pojo;


import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

//销售订单表
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("xs_order")
public class XsOrder {
//'每个订单的唯一标识，按规则生成'
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
//客户下达订单的具体日期，格式为 XXXX - XX - XX
    @TableField(value = "order_date")
    private String orderDate;
//'客户id'
    private Integer cuid;
// '客户订购的零件数量'
   @TableField(value = "order_quantity")
    private Integer orderQuantity;
// '订单的总金额，单位为元，保留两位小数'
   @TableField(value = "order_amount")
     private Double orderAmount;
//'客户订购的零件名称，如发动机缸体'
   @TableField(value = "matid")
    private Integer maTid;
// '零件加工公司承诺的交货时间，格式为 XXXX - XX - XX
    @TableField(value = "delivery_date")
    private String deliveryDate;
//    创建该客户记录的人员id
    @TableField(fill = FieldFill.INSERT)
    private Integer createBy;
//    创建该客户记录的时间
    @TableField(fill = FieldFill.INSERT)
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
//    最后修改该客户记录的人员id
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer updateBy;
//    最后修改该客户记录的时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
//    ''客户的办公地址或收货地址''
    @TableField(value = "contact_address")
    private String contactAddress;
//    '未发货，已发货'
    @TableField(value = "shipment_status")
   private String shipmentStatus;
//    '是否收款'
    @TableField(value = "received_amount")
    private String receivedAmount;
//    '待审批, 已通过, 已拒绝'
    @TableField(value = "approval_status")
    private String approvalStatus;
//    '是否删除'
    @TableLogic
    private Integer deleted;
//    '批注'
    @TableField(value = "comment")
    private String comment;
//    查询客户名称
    @TableField(exist = false)
    private String customerName;
//    查询商品名称
    @TableField(exist = false)
    private String name;
    //条数
    @TableField(exist = false)
    private Integer count;
}
